﻿/*
 弹窗初始化脚本，挂在MsgBox(弹窗画布上)
 Title--弹窗标题
 Content--弹窗内容
 Sure--确定按钮
 Canel--取消按钮
 */

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using Common;

public class UIMessage : MonoBehaviour
{
    public Text Title;
    public Text Content;  //这个是Content下的text
    public Text SureTxt;  //这个是Sure按钮的text
    public Text CancelTxt; //这个是Cancel按钮的text
    public Button Sure;
    public Button Cancel;

    void Start()
    {
        Sure.onClick.AddListener(MessageBox.Sure);
        Cancel.onClick.AddListener(MessageBox.Cancle);
        Title.text = MessageBox.TitleStr;
        Content.text = MessageBox.ContentStr;
        SureTxt.text = MessageBox.SureStr;
        CancelTxt.text = MessageBox.CancelStr;
    }
}